From: Ewan Mellor Date: Tue, 5 Sep 2006 16:06:02 +0000 (+0100) Subject: This patch adds the argument check of "--ms_per_sample=" option. For X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15668^2~12 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=bd5b7756c33c8eabc7d946468c3cf0c8f1a264bc;p=xen.git This patch adds the argument check of "--ms_per_sample=" option. For "--ms_per_sample=", a negative value should be invalid. e.g. % xenmon.py -n --ms_per_sample=-1 usage: xenmon.py [options] xenmon.py: error: option --ms_per_sample: invalid negative value: '-1' Signed-off-by: KUWAMURA Shin'ya --- diff --git a/tools/xenmon/xenmon.py b/tools/xenmon/xenmon.py index 1b74d19403..402b6b4e18 100644 --- a/tools/xenmon/xenmon.py +++ b/tools/xenmon/xenmon.py @@ -672,6 +672,9 @@ def main(): parser = setup_cmdline_parser() (options, args) = parser.parse_args() + if options.mspersample < 0: + parser.error("option --ms_per_sample: invalid negative value: '%d'" % + options.mspersample) start_xenbaked() if options.live: